import yaml from 'js-yaml';

export default class Yaml {

  static Encoder = class Encoder {
    static Name = "<%= UIText.Build %> YAML";

    compute(data) {
      return yaml.safeDump(data);
    }
  }

  static Decoder = class Decoder {
    static Name = "<%= UIText.Parse %> YAML";

    compute(text) {
      return yaml.safeLoad(text);
    }
  }
}
